<head>
    <title><span key="userList.title"/></title>
    <span jwcid="@ScriptIncludes"/>
</head>

<span jwcid="@If" condition="ognl:message != null">
    <div class="message">
        <span jwcid="@Insert" value="ognl:message" raw="true"/>
    </div>
</span>

<a jwcid="@PageLink" page="userForm" id="formLink" style="display:none"/>
<button class="button" onclick="location.href=document.getElementById('formLink').href">Add User</button>

<table jwcid="table@contrib:Table" class="list" id="userList"
    rowsClass="ognl:beans.evenOdd.next" row="ognl:row" source="ognl:userManager.users" 
    columns="id, firstName, lastName, birthday"
    arrowUpAsset="ognl:assets.upArrow" arrowDownAsset="ognl:assets.downArrow">
    <tr jwcid="idColumnValue@Block">
        <a jwcid="@DirectLink" listener="ognl:requestCycle.getPage('userForm').listeners.edit" parameters="ognl:row.id">
            <span jwcid="@Insert" value="ognl:row.id"/>
        </a>
    </tr>
    <tr jwcid="birthdayColumnValue@Block">
        <span jwcid="@Insert" value="ognl:getFormattedDate(row.birthday)"/>
    </tr>
</table>

<script type="text/javascript">highlightTableRows("userList");</script>
